package cn.thornbird.orgsync.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Entity
@Table(name = "login_logs")
@Where(clause = "deleted_at is null")
public class LoginLog extends BaseEntity implements Serializable {

    private static final long serialVersionUID = -9201490948310483571L;

    @Column(name = "user_id")
    private String userId;

    @Column(name = "username")
    private String username;

    @Column(name = "session_id")
    private String sessionId;

    @Column(name = "ip")
    private String ip;

    @Column(name = "user_agent")
    private String userAgent;

    @Column(name = "region")
    private String region;

    @Column(name = "os")
    private String os;

    @Column(name = "browser")
    private String browser;

}
